import instance from "./instence";

const getDeivce = () => {
    return instance({
        url: '/device/list',
        method: 'get'
    })
}
const getUser = () => {
    return instance({
        url: '/',
        method: 'get'
    })
}

const logIn = (data) => {
    return instance({
        url: '/login',
        method: 'post',
        data: data
    })
}

const getChat = (params) => {
    return instance({
        url: '/getchat',
        method: 'get',
        params: params
    })
}

const updateChat = (data) => {
    return instance({
        url: '/updatachat',
        method: 'post',
        data: data
    })
}

const sendImage = (data) => {
    return instance({
        url: 'sendimg',
        method: 'post',
        data
    })
}

export { getDeivce, getUser, logIn, updateChat, getChat, sendImage }